package main

import (
	"fmt"

	"gitee.com/chenxuan520/npyhomework/internal/config"
	_ "gitee.com/chenxuan520/npyhomework/internal/service"
	"gitee.com/chenxuan520/npyhomework/internal/util"
	"gitee.com/chenxuan520/npyhomework/internal/view"
	"github.com/gin-gonic/gin"
)

func main() {
	g := gin.Default()
	g.Use(util.Cors())
	view.InitRoute(g)
	g.Run(fmt.Sprintf(":%d", config.GlobalConfig.Server.Port))
}
